<template>
  <div class="searchBar">
    <el-input clearable @keyup.enter.native="OnSearchCheckAndSubmit" placeholder="请输入搜索关键字" prefix-icon="el-icon-search" v-model="keyword"></el-input>
<!--    <input type="text" class="input"  placeholder="请输入搜索关键字" v-model="keyword"/>-->
    <a  class="submit" @click="OnSearchCheckAndSubmit"></a>
  </div>
</template>

<script>
export default {
  name: 'Search',
  data(){
    return{
      keyword:''
    }
  },
  methods:{
    OnSearchCheckAndSubmit(){
      if (!this.keyword) {
        alert("请输入搜索关键字");
        return;
      }
      else {
        // window.location = "/search/s.aspx?c=&f=0&wd=" + escape(keyword);
        console.log("ssssss")
      }
    }
  }
}
</script>

<style scoped>
.searchBar /deep/.el-input__icon {
  line-height: 28px;
}
.searchBar /deep/.el-input {
  width: 85%;
}
.searchBar /deep/.el-input__inner {
  background-color: #FFF;
  border-radius: 0px;
  border: 1px solid #fff;
  font-size: inherit;
  height: 28px;
  line-height: 28px;
}

.searchBar /deep/.el-input__inner:hover {
  border-color: #C0C4CC;
}

.searchBar /deep/.el-input.is-active .el-input__inner, .searchBar /deep/.el-input__inner:focus {
  border-color: #409EFF;
  outline: 0;
}
</style>
